<template>
  <div class="feedbackDetail">
    <div class="title">{{type==1?'故障反馈':'地址反馈'}}</div>
    <div class="time">{{info.createtime}}</div>
    <div class="tag_view">
      <div class="tag" v-for="(item,index) in info.class" :key="index">{{item}}</div>
    </div>
    <div class="content">{{info.content}}</div>
    <div class="img_view" v-if="type ==1" @click="showImg()">
      <img :src="info.pics" alt class="img">
    </div>
    <div class="address_title">地址信息</div>
    <div class="address_view">
      <div class="station">{{info.device}}</div>
      <div class="address">
        <i class="iconfont icon-dizhi icon"></i>
        <span>{{info.address}}</span>
      </div>
    </div>
    <div class="big-img" v-show="imgShow" @click="hiddenImg()">
      <img :src="info.pics" alt="">
    </div>
  </div>
</template>
   
<style lang="less" scoped>
@import "index.less";
</style>

<script>
export default {
  name: "feedbackDetail",
  data() {
    return {
      charging_icon1: require("../../../assets/images/charging_icon1.png"),
      charging_icon2: require("../../../assets/images/charging_icon2.png"),
      id: "",
      type: 0,
      //后台
      info: {},
      imgShow: false
    };
  },
  created() {
    const query = this.$route.query;
    this.id = query.id;
    this.type = query.type;
    this.getInfo();
  },

  mounted() {},
  methods: {
    getInfo() {
      let url = "";
      if (this.type == 1) {
        url = "/repair/Info";
      } else {
        url = "/error/Info";
      }
      this.$http
        .get(url, {
          params: {
            id: this.id
          }
        })
        .then(res => {
          this.info = res.data.data;
          this.$dialog.loading.close();
        });
    },
    showImg() {
      this.imgShow = true;
    },
    hiddenImg() {
      this.imgShow = false;
    }
  },
  components: {}
};
</script>
